Skip to content

Add MiniMax image generation tool#456

Open
octo-patch wants to merge 4 commits into
shareAI-lab:mainfrom
octo-patch:octo/20260708-add-minimax-image-recvoLaeDWoYEh
Open

Add MiniMax image generation tool#456
octo-patch wants to merge 4 commits into
shareAI-lab:mainfrom
octo-patch:octo/20260708-add-minimax-image-recvoLaeDWoYEh

Conversation

@octo-patch

@octo-patch octo-patch commented Jul 9, 2026

Copy link
Copy Markdown

Reason: add target image capability using existing tool/provider pattern

Summary

  • Add a MiniMax-backed generate_image tool to the tool-use lesson.
  • Register the tool in the existing TOOLS schema and TOOL_HANDLERS dispatch map.
  • Support the documented global and China mainland API hosts.
  • Match the official prompt length, aspect-ratio default, and request contract.
  • Synchronize the three lesson source docs and diagrams; prebuild regenerates and validates web artifacts without adding generated snapshots to the PR diff.

Checks

  • python -m pytest tests -q (26 passed, 32 subtests)
  • python -m py_compile s02_tool_use/code.py tests/test_s02_generate_image.py
  • npx tsc --noEmit
  • npm run build

Contribution Note

AI assistance was used for implementation and verification. I reviewed the final diff and test results.

@octo-patch

Copy link
Copy Markdown
Author

Follow-up audit completed. I made the image tool configurable for both regional API hosts, synchronized the three lesson docs, diagram, and generated web data, and added a focused request-contract test. I ran python -m pytest tests -q (25 passed, 32 subtests), tsc --noEmit, and npm run build.

@octo-patch

Copy link
Copy Markdown
Author

Follow-up audit completed. I aligned the image tool schema with the documented prompt limit and aspect-ratio default, updated the touched lesson and generated content, and pushed commit 4156fe6. I ran python -m pytest tests -q (26 passed, 32 subtests), npx tsc --noEmit, and npm run build.

@octo-patch

Copy link
Copy Markdown
Author

Follow-up audit completed. I removed generated web artifacts from the PR diff because prebuild regenerates them from synchronized lesson sources; the final net diff now contains only source and test files with no CJK added lines. I pushed commit 81d211f and reran python -m pytest tests -q (26 passed, 32 subtests), npx tsc --noEmit, and npm run build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant